import Vue from 'vue'
import Router from 'vue-router'
import Login from '../views/Login.vue'
import Register from '../views/Register'
import Index from '../views/Index'
import User from '../views/user/index'
import Home from '../views/Home'
import Category from '../components/Category'
import CreateArticle from '../views/CreateArticle'
import Editor from '../components/Editor'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path:'/',
      redirect:'/index'
    },
    {
      path: '/index',
      name: 'Index',
      component: Index
    },
    {
      path: '/login',
      name: 'login',
      component: Login
    },
    {
      path: '/register',
      name: 'register',
      component: Register
    },
    {
      path: '/user',
      component: User
    },
    {
      path: '/home',
      component: Home
    },
    {
      path: '/category',
      component: Category
    },{
      path:'/createarticle',
      component:CreateArticle
    },{
      path:'/editor',
      component:Editor
    }
  ]
})
